



import pytest
import requests
from  send.Send import Send
from utils.read_yaml import  read_yaml


class Test_login:
    @pytest.mark.parametrize(  "args"  ,  read_yaml(r"C:\Program Files\pyxiangmu\jiekoutest\case\data\login.yaml")   )
    def test_login(self,args):


        ############ 创建全局session变量
        session = requests.session()

        send = Send()

        result = send.send_login(session,args["username"],args["pwd"])

        assert result["code"] == 200 and result["body"]["code"] == args["exp"]






